package com.xuecheng.api.media.model;

import com.xuecheng.api.media.model.aliyun.VodUploadRequest;
import com.xuecheng.api.media.model.aliyun.VodUploadToken;
import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.api.media.model.vo.MediaVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

@Api(tags = "文件上传微服务API")
public interface MediaApi {

    @ApiOperation("获得媒资文件上传凭证")
    VodUploadToken generateVodToken(VodUploadRequest request);

    @ApiOperation("刷新媒资文件上传凭证")
    @ApiImplicitParam(name = "videoId",value = "媒资ID",required = true,paramType = "path",dataType = "String")
    VodUploadToken refreshVodToken(String videoId);

    @ApiOperation("保存媒资信息")
    MediaDTO saveMedia(MediaVO mediaVO);

    @ApiOperation("分页查询媒资信息接口")
    PageVO<MediaDTO> queryMedia(PageRequestParams params,MediaVO mediaVO);

    @ApiOperation("根据媒资Id查询视频文件的播放地址")
    String queryMediaUrl(Long mediaId);
    @ApiOperation("根据媒资Id删除媒资信息")
    void removeMedia(Long mediaId);

    @ApiOperation("运营分页查询全部媒资信息")
    PageVO<MediaDTO> queryMedias(PageRequestParams params,MediaVO mediaVO);

    @ApiOperation("运营平台对媒资进行审核")
    void createMediaM(MediaVO mediaVO);

    @ApiOperation("根据媒资ID查询媒资信息")
    RestResponse queryMediaById(Long mediaId);
}
